﻿@using Abp.Extensions
@using Akso.Entities
@using Akso.Web.Areas.Mpa.Models.Common.Modals
@model Akso.Web.Areas.BasicData.Models.Vendors.CreateOrEditVendorModalViewModel

@Html.Partial("~/Areas/Mpa/Views/Common/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(Model.IsEditMode ? (L("Page_BasicData.Vendors_Button_EditVendor") + ": " + Model.Vendor.Name) : L("Page_BasicData.Vendors_Button_CreateNewVendor")))

<div class="modal-body">

    <form name="ObjectForm" role="form" novalidate class="form-validation">

        @if (Model.IsEditMode)
        {
            <input type="hidden" name="Id" value="@Model.Vendor.Id" />
        }

        <div class="form-group form-md-line-input form-md-floating-label no-hint">
            <input type="text" name="Name" value="@Model.Vendor.Name" class="form-control edited" required maxlength="@Vendor.MaxNameLength"/>
            <label>@L("Page_BasicData.Vendors_Column_Name")</label>
        </div>

        <div class="form-group form-md-line-input form-md-floating-label no-hint">
            <input type="text" name="Address" value="@Model.Vendor.Address" class="form-control edited" required maxlength="@Vendor.MaxAddressLength" />
            <label>@L("Page_BasicData.Vendors_Column_Address")</label>
        </div>

        <div class="form-group form-md-line-input form-md-floating-label no-hint">
            <input type="text" name="Contact" value="@Model.Vendor.Contact" class="form-control edited" required maxlength="@Vendor.MaxContactLength" />
            <label>@L("Page_BasicData.Vendors_Column_Contact")</label>
        </div>

        <div class="form-group form-md-line-input form-md-floating-label no-hint">
            <input type="text" name="ContactMobile" value="@Model.Vendor.ContactMobile" class="form-control edited" required maxlength="@Vendor.MaxContactMobileLength" />
            <label>@L("Page_BasicData.Vendors_Column_ContactMobile")</label>
        </div>

        <div class="form-group form-md-line-input form-md-floating-label no-hint">
            <input type="text" name="ContactTelephone" value="@Model.Vendor.ContactTelephone" class="form-control edited" required maxlength="@Vendor.MaxContactTelephoneLength" />
            <label>@L("Page_BasicData.Vendors_Column_ContactTelephone")</label>
        </div>

    </form>

</div>

@Html.Partial("~/Areas/Mpa/Views/Common/Modals/_ModalFooterWithSaveAndCancel.cshtml")
